package com.ruoyi.hualian.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hualian.mapper.HlBearingMapper;
import com.ruoyi.hualian.domain.HlBearing;
import com.ruoyi.hualian.service.IHlBearingService;

/**
 * 轴承型号Service业务层处理
 * 
 * @author hujian
 */
@Service
public class HlBearingServiceImpl implements IHlBearingService 
{
    @Autowired
    private HlBearingMapper hlBearingMapper;

    /**
     * 根据已知信息查询具体对象信息
     * @param bearing 已知信息
     * @return 具体对象信息
     */
    @Override
    public HlBearing selectOne(String tpShape, String bearing) {
        LambdaQueryWrapper<HlBearing> hlBearingWrapper = new LambdaQueryWrapper<>();

        hlBearingWrapper.eq(HlBearing::getBearing, bearing);

        return hlBearingMapper.selectOne(hlBearingWrapper);
    }


    /**
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     */


    /**
     * 查询轴承型号
     * 
     * @param bearingId 轴承型号主键
     * @return 轴承型号
     */
    @Override
    public HlBearing selectHlBearingByBearingId(Long bearingId)
    {
        return hlBearingMapper.selectHlBearingByBearingId(bearingId);
    }

    /**
     * 查询轴承型号列表
     * 
     * @param hlBearing 轴承型号
     * @return 轴承型号
     */
    @Override
    public List<HlBearing> selectHlBearingList(HlBearing hlBearing)
    {
        return hlBearingMapper.selectHlBearingList(hlBearing);
    }

    /**
     * 新增轴承型号
     * 
     * @param hlBearing 轴承型号
     * @return 结果
     */
    @Override
    public int insertHlBearing(HlBearing hlBearing)
    {
        return hlBearingMapper.insertHlBearing(hlBearing);
    }

    /**
     * 修改轴承型号
     * 
     * @param hlBearing 轴承型号
     * @return 结果
     */
    @Override
    public int updateHlBearing(HlBearing hlBearing)
    {
        return hlBearingMapper.updateHlBearing(hlBearing);
    }

    /**
     * 批量删除轴承型号
     * 
     * @param bearingIds 需要删除的轴承型号主键
     * @return 结果
     */
    @Override
    public int deleteHlBearingByBearingIds(Long[] bearingIds)
    {
        return hlBearingMapper.deleteHlBearingByBearingIds(bearingIds);
    }

    /**
     * 删除轴承型号信息
     * 
     * @param bearingId 轴承型号主键
     * @return 结果
     */
    @Override
    public int deleteHlBearingByBearingId(Long bearingId)
    {
        return hlBearingMapper.deleteHlBearingByBearingId(bearingId);
    }
}
